
CXX=g++
LDFLAGS=-L/usr/local/lib -losg -losgDB -losgViewer
CFLAGS=-Wall -g
ALL=binarytree
OBJS=main.o btnode.o scenegraph.o commandline.o callback.o

binarytree: $(OBJS)
	$(CXX) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@

main.o: main.cpp btnode.h scenegraph.h global.h callback.h
	$(CXX) $(CFLAGS) -c main.cpp

btnode.o: btnode.cpp btnode.h scenegraph.h global.h
	$(CXX) $(CFLAGS) -c btnode.cpp

scenegraph.o: scenegraph.cpp btnode.h scenegraph.h global.h
	$(CXX) $(CFLAGS) -c scenegraph.cpp

callback.o: callback.cpp callback.h
	$(CXX) $(CFLAGS) -c callback.cpp

commandline.o: commandline.cpp global.h
	$(CXX) $(CFLAGS) -c commandline.cpp

clean:
	-rm -f $(ALL) $(OBJS)

